//
//  TZLoadButton.m
//  BSBDJ
//
//  Created by user on 16/5/23.
//  Copyright © 2016年 Burning. All rights reserved.
//

#import "TZLoadButton.h"

@implementation TZLoadButton

- (void)layoutSubviews
{
    [super layoutSubviews];

    if (self.titleLabel.y != self.width){
        
        [self.titleLabel sizeToFit];
        self.imageView.x = 0;
        self.imageView.y = 0;
        self.imageView.height = self.width;
        self.imageView.width = self.width;
        
        self.titleLabel.x = 0;
        self.titleLabel.y = self.width;
        self.titleLabel.width = self.width;
        self.titleLabel.height = self.height - self.width;
        self.titleLabel.textAlignment = NSTextAlignmentCenter;
        NSLog(@"%@",NSStringFromCGRect(self.imageView.frame));
        NSLog(@"%@",NSStringFromCGRect(self.titleLabel.frame));
        
    }
    
}
@end
